<?php echo $__env->make('admin::layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class="admin-main layui-anim layui-anim-upbit">
	<fieldset class="layui-elem-field layui-field-title">
		<legend>修改密码</legend>
	</fieldset>
	<form class="layui-form layui-form-pane" lay-filter="form">
		<div class="layui-form-item">
			<label class="layui-form-label">用户名</label>
			<div class="layui-input-4">
				<input type="text" value="<?php echo e(\Auth::guard("admin")->user()->username); ?>" disabled class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">原密码</label>
			<div class="layui-input-4">
				<input type="password" name="y_password" placeholder="请输入原密码" lay-verify="y_password" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux"> 原密码必须大于4位，小于14位。
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">密码</label>
			<div class="layui-input-4">
				<input type="password" name="password" id="password" placeholder="请输入登录密码" lay-verify="password" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux"> 密码必须大于4位，小于14位。
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">确认密码</label>
			<div class="layui-input-4">
				<input type="password" name="password_confirmation" placeholder="请输入登录密码" lay-verify="password_confirmation" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux"> 密码必须大于4位，小于14位。
			</div>
		</div>
		<?php echo $__env->make('admin::layouts.submit',['url'=>route('admin.index.main')], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
	</form>
</div>
<?php echo $__env->make('admin::layouts.footer', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make('admin::layouts.edit_ajax',['url'=>route('admin.index.upadte_pwd',['id'=>\Auth::guard("admin")->user()->id])], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<script>
	layui.use(['form', 'layer'], function () {
        var form = layui.form,layer = layui.layer,$= layui.jquery;
		form.verify({ 
			y_password:[/[a-zA-Z0-9_-]{4,14}$/, '原密码必须4到14位！']
			,password: [/[a-zA-Z0-9_-]{4,14}$/, '密码必须4到14位！']
			,password_confirmation: function(value){
				var password = $('#password').val();
				if(value != password){
					return '两次密码输入不一致！';
				}
			}
		});
    })
 </script>